﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin2.master" AutoEventWireup="true" CodeFile="QuanLyLoaiSP.aspx.cs" Inherits="Admin_QuanLyLoaiSP" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
        .style1
        {
            width: 403px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <fieldset>
                <legend style="text-align:center;font:18px bold; color:Black">Loại Sản Phẩm</legend>
                <table width="100%">
                    <tr>
                        <td>

                            <div id="table-content">
			
				<!--  start message-red -->
                <!--
				<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="red-left">Lỗi. <a href="AddProduct.aspx"> Vui lòng nhấp vào đây để thử lại một lần nữa.</a></td>
					<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-red >--
			
				<!--  start message-green >--
				<div id="message-green">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Sản phẩm được thêm thành công. <a href="AddProduct.aspx">Thêm sản phẩm mới.</a></td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>-->
                <div id="Div1">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Tổng số loại sản phẩm cửa hàng có : <asp:Label ID="lbproducts" 
                            runat="server" Text="Label" ForeColor="#6DA827"></asp:Label>&nbsp;loại sản phẩm. </td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-green -->
                <div style="height:12px;clear:both"></div>
		       <div align="center"> <asp:GridView ID="gvPhanLoai" runat="server" AutoGenerateColumns="False" 
                         Width="494px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="LoaiSP" onrowdeleting="gvPhanLoai_RowDeleting" 
                    PageSize="5" onpageindexchanging="gvPhanLoai_PageIndexChanging" 
                                    onrowdatabound="gvPhanLoai_RowDataBound" 
                                    onrowcommand="gvPhanLoai_RowCommand" onrowediting="gvPhanLoai_RowEditing">
                        <Columns>
                            <asp:TemplateField HeaderText="STT">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex+1 %>"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="30px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="LoaiSP" HeaderText="Mã Loại" 
                                SortExpression="LoaiSP" />
                            <asp:BoundField DataField="TenLoaiSP" HeaderText="Tên Loại" 
                                SortExpression="TenLoaiSP" />
                            <asp:BoundField DataField="TenDanhMuc" HeaderText="Tên Danh Mục" 
                                SortExpression="TenDanhMuc" />
                            <asp:TemplateField HeaderText="Chọn">
                                <ItemTemplate>
                                <div style="vertical-align:middle;margin-left:10px;">
                                <asp:LinkButton ID="LinkButton2" CssClass="btnicon2" runat="server" 
                                        CommandName="Delete" 
                                        ToolTip="Xóa loại sản phẩm"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton1" CssClass="btnicon1" runat="server" 
                                        CommandName="Edit" ToolTip="Sửa loại sản phẩm" 
                                        CommandArgument='<%# Eval("LoaiSP") %>'></asp:LinkButton>
                                    
                                    
                                    </div>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView> </div>
		 
				<!--  start product-table ..................................................................................... -->
				
		
			
			
			
			
			<div class="clear"></div>
		 
            </div>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbthongbaoloi" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" >
                <asp:HiddenField ID="hdpageindex" runat="server" Value="0" />
                </td>
                    </tr>
                </table>
                <p align="center">
                    <asp:Button ID="btinsert" runat="server" onclick="btinsert_Click" 
                        Text="Thêm Mới" Height="25px" Width="90px" />
                </p>
               
                <br />
            </fieldset>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <fieldset>
                <legend style="text-align:center;font:18px bold; color:Black">Thông Tin Chi Tiết Loại</legend>
                <p>&nbsp;</p>
                <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
                <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Mã Loại :"></asp:Label>
                           
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtMaLoai" runat="server" CssClass="inp-form" ReadOnly="True"></asp:TextBox>                        
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Tên Loại :&nbsp;&nbsp;
                        </td>
                        <td class="style1">
                            <asp:TextBox ID="txtTenLoai" runat="server" CssClass="inp-form"></asp:TextBox>                        
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtTenLoai" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
			<td>Loại Sản Phẩm:</td>
            
			<td class="style1"><asp:DropDownList class="styledselect_form_1" ID="dlLoaiDanhMuc" 
                    runat="server" CssClass="styledselect_form_1">
            </asp:DropDownList></td>
			<td align="center">
			
			    &nbsp;</td>
		</tr>
                    <tr>
                    <td>&nbsp;
                    </td>
                    <td class="style1">
                        <asp:Button ID="btupdate" runat="server" onclick="btupdate_Click" 
                            Text="Cập Nhật" Height="25px" Width="90px" />
                        <asp:Button ID="btthem" runat="server" onclick="btthem_Click" Text="Thêm Mới" 
                            Height="25px" Width="90px" />
                    </td>
                    </tr>
                </table>
            </fieldset>

        </asp:View>
       
    </asp:MultiView>
</asp:Content>

